//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package org.ares.app.demo.common.cfg;

import org.ares.app.demo.common.mvc.DemoInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class DemoWebAppCfg extends WebMvcConfigurerAdapter {
    static final Logger log = LoggerFactory.getLogger(DemoWebAppCfg.class);

    public DemoWebAppCfg() {
    }

    @Bean
    public DemoInterceptor demoInterceptor() {
        return new DemoInterceptor();
    }

    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(this.demoInterceptor()).addPathPatterns(new String[]{"/action/**"}).addPathPatterns(new String[]{"/api/**"}).excludePathPatterns(new String[]{"/api/user/regisger"});
        super.addInterceptors(registry);
    }
}
